
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>趣赏客用户登录</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<!-- load css -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/denglu/common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/denglu/houtai/css/login.css" media="all">
</head>
<body>
<div class="layui-canvs"></div>
<div class="layui-layout layui-layout-login">
	<h1>
		 <strong>趣赏客用户登录</strong>
		 <em>Management System</em>
	</h1>
	<div class="layui-user-icon larry-login">
		 <input type="text"  id="username" placeholder="账号" class="login_txtbx"/>
	</div>
	<div class="layui-pwd-icon larry-login">
		 <input type="password"  id="password" placeholder="密码" class="login_txtbx"/>
	</div>
    <div class="layui-val-icon larry-login">
    	<div class="layui-code-box" style="width:100%;">
    		<input type="text" id="code"  name="code" placeholder="验证码" maxlength="4" class="login_txtbx">
            <img src='{:U("Login/verify")}' onClick="this.src=this.src+'?'+Math.random()"/>
    	</div>
    </div>
    <div class="layui-submit larry-login">
    	<input type="button" value="立即登陆"  onClick="dosubmit()" class="submit_btn"/>
    </div>
    <div class="layui-login-text">
    	<p style="text-align:right;"><a href="{:U('Login/reg')}">没有账号现在注册</a></p>
    
    </div>
</div>

<div style="position:fixed;bottom:50px;left:20px;"><a href="/index.php/Fenxiaohoutai" style="color:#fff;font-size:20px;font-weight:bold;">趣赏客合伙人登录</a></div>
<script type="text/javascript" src="__PUBLIC__/denglu/common/layui/lay/dest/layui.all.js"></script>
<script type="text/javascript" src="__PUBLIC__/denglu/houtai/js/login.js"></script>
<script type="text/javascript" src="__PUBLIC__/denglu/houtai/jsplug/jparticle.jquery.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript">
$(function(){
	$(".layui-canvs").jParticle({
		background: "#141414",
		color: "#E6E6E6"
	});
	//登录链接测试，使用时可删除
	
});
</script>
<script>
  
  function dosubmit(){
  
  
    var verify=$('#code').val();
    var username=$('#username').val();
	var password=$('#password').val();
	
	if(username==""){
	
	  layer.msg('用户名不能为空', {icon: 5});return;
	}
	
	if(password==""){
	
	  layer.msg('密码不能为空', {icon: 5});return;
	
	}
	
	if(verify==""){
	
	   layer.msg('验证码不能为空', {icon: 5});return;
	
	}
	
	$.post("{:U('Login/login')}",{"username":username,"password":password,'verify':verify},function(re){
	  
	  if(re==1){
	    layer.alert('恭喜您登录成功', {icon: 6},function(){
		
		  location.href="{:U('Index/index')}";
		
		});
		
	  }else if(re==2){
	  
	      layer.msg('用户名或者密码错误', {icon: 5});return;
	  
	  }else if(re==3){
	  
	      layer.msg('验证码错误', {icon: 5});return;
	  
	  }
	
	
	})
  
  
 
  
  }

</script>


</body>
</html>